#ifndef __P_STRUTILS_H__
#define __P_STRUTILS_H__

#include <string>

#include "p_types.h"

/**
 * Converts a numeric value to a std::string.
 *
 * @param value The value which is going to be converted.
 */
std::string to_string(const p_unsigned_int &value);

/**
 * Converts a numeric value to a std::string.
 *
 * @param value The value which is going to be converted.
 */
std::string to_string(const p_signed_int &value);

/**
 * Converts a numeric value to a std::string.
 *
 * @param value The value which is going to be converted.
 */
std::string to_string(const float &value);

/**
 * Converts a numeric value to a std::string.
 *
 * @param value The value which is going to be converted.
 */
std::string to_string(const double &value);

/**
 * This function checks whether the current parameter is a valid alpha character,
 * which means in the range of a..z and A..Z.
 *
 * @param c The character which will be tested.
 */
bool is_alpha(const p_char &c);

/**
 * This function tests whether the current character is a numeric one.
 *
 * @param c The character which will be tested.
 */
bool is_num(const p_char &c);

/**
 * This function combines the above ones.
 *
 * @param c The character which will be tested.
 */
bool is_alnum(const p_char &c);

/**
 * The function checks whether the given c is a blank character.
 *
 * @param c The character which will be tested.
 */
bool is_blank(const p_char &c);

/**
 * This function checks whether the given c is a line end character.
 *
 * @param c The character which will be tested.
 */
bool is_eoln(const p_char &c);

#endif
